import request from '@/utils/request'

// 查询调研任务列表
export function researchList(query) {
  return request({
    url: '/task/research/list',
    method: 'get',
    params: query
  })
}
// 新增调研任务
export function addresearch(data) {
  return request({
    url: '/task/research',
    method: 'post',
    data: data
  })
}


// 获取调研任务详细信息
export function researchId(id) {
  return request({
    url: `/task/research/${id}`,
    method: 'get',
  })
}


// 修改调研任务
export function eitHresearch(data) {
  return request({
    url: '/task/research',
    method: 'put',
    data: data
  })
}

// 删除调研任务
export function delresearch(id) {
  return request({
    url: `/task/research/${id}`,
    method: 'delete'
  })
}

// 导出品类列表
export function exporTresearch(data) {
  return request({
    url: '/task/research/export',
    method: 'post',
    data: data
  })
}

// 审核调研任务
export function researchAudit(query) {
  return request({
    url: '/task/research/audit',
    method: 'get',
    params: query
  })
}
// 同意调研任务
export function cliCAudit(data) {
  return request({
    url: '/task/research/audit',
    method: 'post',
    params: data
  })
}

// 未提交调研任务
export function uncommit(data) {
  return request({
    url: '/task/research/un-commit',
    method: 'post',
    params: data
  })
}

// 不通过调研任务
export function nopass(data) {
  return request({
    url: '/task/research/no-pass',
    method: 'post',
    data: data
  })
}


// 获取试卷详细信息(包含试题及试题选项)
export function papergetAll(id) {
  return request({
    url: `/study/paper/get-all-info/${id}`,
    method: 'get',
  })
}


// 查看问卷
export function listpaper(data) {
  return request({
    url: '/task/research/list-paper',
    method: 'post',
    data: data
  })
}
